package com.xiguaji.tiktok.v1.ins.dic.repository;

import com.xiguaji.tiktok.v1.ins.dic.model.InsDicCommercialCategory;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface InsDicCommercialCategoryRepository extends CrudRepository<InsDicCommercialCategory,Long> {

    @Query("SELECT distinct commercial_category FROM ins_dic_commercial_category ORDER BY commercial_category")
    List<InsDicCommercialCategory> findCommercial();

    List<InsDicCommercialCategory> findByCommercialCategoryOrderByCategory(String commercialCategory);
}
